<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('system_config', function (Blueprint $table) {
            $table->id();
            $table->string('label', 50);
            $table->string('name', 50)->unique();
            $table->text('value')->nullable();
            $table->string('group_name', 50);
            $table->string('input_type', 50);
            $table->string('desc', 255)->nullable();
            $table->json('default_value')->nullable();
            $table->unsignedInteger('sort')->default(0);
            $table->timestamps();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('system_config');
    }
};
